package com.chatserver.client.gui;

import info.clearthought.layout.TableLayout;
import java.awt.BorderLayout;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JPasswordField;
import javax.swing.JTextField;

import javax.swing.WindowConstants;
import javax.swing.SwingUtilities;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class LoginInterface extends JFrame {

	{
		//Set Look & Feel
		try {
			javax.swing.UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
		} catch(Exception e) {
			e.printStackTrace();
		}
	}

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private JPanel jPanel1;
	private JTextField username;
	private JLabel passdesc;
	private JPasswordField password;
	private JButton cancel;
	private JButton login;
	private JLabel userdesc;

	/**
	* Auto-generated main method to display this JFrame
	*/
	public static void main(String[] args) {
		SwingUtilities.invokeLater(new Runnable() {
			public void run() {
				LoginInterface inst = new LoginInterface();
				inst.setLocationRelativeTo(null);
				inst.setVisible(true);
				inst.setTitle("ChatServer Client");
			}
		});
	}
	
	public LoginInterface() {
		super();
		initGUI();
	}
	
	private void initGUI() {
		try {
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			{
				jPanel1 = new JPanel();
				TableLayout jPanel1Layout1 = new TableLayout(new double[][] {{76.0, TableLayout.FILL, 130.0, TableLayout.FILL}, {69.0, 30.0, 30.0, 30.0}});
				jPanel1Layout1.setHGap(5);
				jPanel1Layout1.setVGap(5);
				TableLayout jPanel1Layout = new TableLayout(new double[][] {{100.0, 100.0, 28.0, TableLayout.FILL}, {30.0, 30.0, 30.0, TableLayout.FILL}});
				jPanel1Layout.setHGap(5);
				jPanel1Layout.setVGap(5);
				jPanel1.setLayout(jPanel1Layout1);
				getContentPane().add(jPanel1, BorderLayout.CENTER);
				{
					userdesc = new JLabel();
					jPanel1.add(userdesc, "1, 1");
					userdesc.setText("Username: ");
				}
				{
					username = new JTextField();
					jPanel1.add(username, "2, 1");
					username.setPreferredSize(new java.awt.Dimension(83, 22));
				}
				{
					passdesc = new JLabel();
					jPanel1.add(passdesc, "1, 2");
					passdesc.setText("Password:");
				}
				{
					login = new JButton();
					jPanel1.add(login, "1, 3");
					login.setText("Login");
				}
				{
					cancel = new JButton();
					jPanel1.add(cancel, "2, 3");
					cancel.setText("Cancel");
				}
				{
					password = new JPasswordField();
					jPanel1.add(password, "2, 2");
				}
			}
			pack();
			setSize(400, 300);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

}
